<template>
	<view class="content" style="background-color: orange;margin-top: 50rpx;">
		<text style="font-size: 50rpx;">子组件A</text>
		<view class="coma_box">
			<text>父组件传进来的值:</text>
			<text style="font-weight: bold;color: red;">{{intent}}</text>
		</view>
		<button type="primary" @click="sendData()">传值给ComB组件</button>
	</view>
</template>

<script>
	export default {
		props:['intent'],
		name:"comA",
		data() {
			return {
			};
		},
		mounted() {
			console.log("comA---mounted");
		},
		methods:{
			sendData(){
				console.log("comA---sendData");
				uni.$emit('SendIntent',this.intent)
			}
		}
	}
</script>

<style>
.content{
	height: 120px;
	width: 90%;
	margin: 50rpx auto;
}
button{
	width: 60%;
	margin-bottom: 30rpx;
}
</style>